<%@ page import="com.apexedu.framework.util.SysPropertiesUtil" %>
<%@ page import="com.apexedu.portal.constant.Constants" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<html>
<head>
    <title><%=Constants.ProjectInfo.PROJECT_NAME%>
    </title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
</head>
<body>
<div id="main">
    <jsp:include page="<%=Constants.ProjectInfo.HEAD_VIEW%>"/>
    <script type="text/javascript">
        var imgUrl = '<%=SysPropertiesUtil.get("imgUrl")%>';
        var intss;
        $(function () {
            intss = setInterval("countDown()", 500);
        });
        function countDown() {
            if ($("img[src*='/UserFiles']:not([src*='"+imgUrl +"'])").length > 0) {
                $("img[src*='/UserFiles']:not([src*='"+imgUrl +"'])").attr("src", function () {
                    var src = $(this).attr("src");
                    return imgUrl + src.substring(src.indexOf("/UserFiles"));
                });
               setTimeout(function(){$("#contentBg").css({"bottom":"-44px","position":"absolute"});},800);
            } else {
                setTimeout(function(){$("#contentBg").css({"bottom":"-44px","position":"absolute"});},800);
                window.clearInterval(intss);
            }
        }
        function browseFolder(path) {
            try {
                var Message = "\u8bf7\u9009\u62e9\u6587\u4ef6\u5939"; //选择框提示信息
                var Shell = new ActiveXObject("Shell.Application");
                var Folder = Shell.BrowseForFolder(0, Message, 64, 17); //起始目录为：我的电脑
                //var Folder = Shell.BrowseForFolder(0, Message, 0); //起始目录为：桌面
                if (Folder != null) {
                    Folder = Folder.items(); // 返回 FolderItems 对象
                    Folder = Folder.item(); // 返回 Folderitem 对象
                    Folder = Folder.Path; // 返回路径
                    if (Folder.charAt(Folder.length - 1) != "\\") {
                        Folder = Folder + "\\";
                    }
                    document.getElementById(path).value = Folder;
                    return Folder;
                }
            } catch (e) {
                alert(e.message);
            }
        }
    </script>
    <div id="content">
        <div id="contentSub" class="contentSub<%=Constants.ProjectInfo.PROJECT_CODE%>" style="height: auto;">
            <div id="noticeDetail">
                <div>
                    <div class="title">${blog.title}</div>
                    <div
                            style="border-top: 1px solid dodgerblue; width: 95%; MARGIN-RIGHT: auto; MARGIN-LEFT: auto;"></div>

                    <div class="titleDetail">发布单位：${blog.bmname}&nbsp;&nbsp;&nbsp;&nbsp;发布时间：${blog.fbsj}
                    </div>
                    <div class="contentXx">${blog.content}</div>

                    <br/>

                    <div style="font-size: 20px">
                        <c:if test="${blog.attach!=null &&fn:length(blog.attach)!=0 }">
                            <img src="${basePath}/resources/images/attach.gif" complete="complete"/>相关附件：
                        </c:if>

                        <c:forEach items="${blog.attach}" var="attach">
                            <img src="${basePath}/resources/images/col-move-top.gif"
                                 complete="complete"/>
                            <a href="${basePath}/s/uc/mh/down/${attach.id}"
                               target="_blank"> ${attach.title} </a>
                        </c:forEach>
                    </div>
                </div>
            </div>
        </div>
        <div id="contentBg"></div>
    </div>
    <jsp:include page="<%=Constants.ProjectInfo.FOOT_VIEW%>"/>
</div>
</body>
</html>
